package com.bc.bcbuyerapihttp.controller;

import com.bc.bcapi.service.T_Activity_detailService;
import com.bc.bcapi.service.T_Activity_topService;
import com.bc.bcapi.service.T_Home_activityService;
import com.bc.bcapi.service.T_Home_bannerService;
import com.bc.commonentity.common.JsonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Name ActivityController
 * @Description TODO
 * @Author douhaichao
 * @Date 2018/10/31 16:53
 * @Version 1.0
 **/
@RestController
@RequestMapping(value = "ac")
@Api(value = "活动相关")
public class ActivityController {

    @Autowired
    T_Activity_topService t_activity_topService;

    @Autowired
    T_Activity_detailService t_activity_detailService;
    @Autowired
    T_Home_bannerService t_home_bannerService;
    @Autowired
    T_Home_activityService t_home_activityService;

    @ApiOperation(value = "获取TOP排行榜")
    @RequestMapping(value = "gettop", method = RequestMethod.GET)
    public JsonResult getTop(HttpServletRequest request, HttpServletResponse response) {
        return t_activity_topService.getTop(request, response);
    }

    @ApiOperation(value = "获取{项目评价数据}活动图片包")
    @RequestMapping(value = "getprojectevaluationdata", method = RequestMethod.GET)
    public JsonResult getProjectEvaluationData(HttpServletRequest request, HttpServletResponse response) {
        return t_activity_detailService.getProjectEvaluationData(request, response);
    }

    @ApiOperation(value = "获取首页banner管理")
    @RequestMapping(value = "gethomebanner", method = RequestMethod.GET)
    public JsonResult getHomeBanner(HttpServletRequest request, HttpServletResponse response) {
        return t_home_bannerService.getHomeBanner(request, response);
    }


}
